From a3e94225c72f004d45dceeb7e087985f065bddb1 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild2.aw" Date: Thu, 14 Dec 2006 09:56:41 -0700 Subject: [PATCH] [IA64][HVM] Use vcpu info from getdomaininfo This replaces the get/set_param using HVM_PARAM_VCPUS Signed-off-by: Alex Williamson --- tools/libxc/ia64/xc_ia64_hvm_build.c | 10 ++++++++-- tools/python/xen/lowlevel/xc/xc.c | 4 ---- xen/include/public/arch-ia64.h | 7 ------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/tools/libxc/ia64/xc_ia64_hvm_build.c b/tools/libxc/ia64/xc_ia64_hvm_build.c index ac3a2ff00d..3bfa274293 100644 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c @@ -660,8 +660,14 @@ setup_guest(int xc_handle, uint32_t dom, unsigned long memsize, goto error_out; } - // Get number of vcpus, stored by pyxc_hvm_build() - xc_get_hvm_param(xc_handle, dom, HVM_PARAM_VCPUS, &vcpus); + domctl.cmd = XEN_DOMCTL_getdomaininfo; + domctl.domain = (domid_t)dom; + if (xc_domctl(xc_handle, &domctl) < 0) { + PERROR("Could not get info on domain"); + goto error_out; + } + + vcpus = domctl.u.getdomaininfo.max_vcpu_id + 1; // Hand-off state passed to guest firmware if (xc_ia64_build_hob(xc_handle, dom, dom_memsize, vcpus) < 0) { diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index f69cbf2a41..eaa8fe0846 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -408,10 +408,6 @@ static PyObject *pyxc_hvm_build(XcObject *self, &image, &vcpus, &pae, &acpi, &apic) ) return NULL; -#if defined(__ia64__) - /* Set vcpus to later be retrieved in setup_guest() */ - xc_set_hvm_param(self->xc_handle, dom, HVM_PARAM_VCPUS, vcpus); -#endif if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 ) return pyxc_error_to_exception(); diff --git a/xen/include/public/arch-ia64.h b/xen/include/public/arch-ia64.h index d478fb0afa..65cc233af3 100644 --- a/xen/include/public/arch-ia64.h +++ b/xen/include/public/arch-ia64.h @@ -66,13 +66,6 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); /* WARNING: before changing this, check that shared_info fits on a page */ #define MAX_VIRT_CPUS 64 -/* - * HVM_PARAM_PAE_ENABLED is meaningless on ia64, so we overload this - * entry to store the number of vCPUs. XXX Need arch-specific extentions - * for xc_get/set_hvm_param(). - */ -#define HVM_PARAM_VCPUS HVM_PARAM_PAE_ENABLED - #ifndef __ASSEMBLY__ typedef unsigned long xen_ulong_t; -- 2.30.2